package com.tt.test;

import com.tt.transaction.Transactional;

public class AccountService {
    @Transactional
    public void transferMoney() {
        System.out.println("Transferring money...");
    }
    @Transactional
    public void transferMoneyError() {
        // 模拟业务逻辑
        System.out.println("正在进行转账操作...");
        // 抛出异常以触发回滚
        throw new RuntimeException("转账失败，触发回滚");
    }
}